package com.wzdigit.wms.basic.enums;
/**
 * 凭证类型
 */
public enum TrsnNoteTypeEnum implements BaseEnum {

    IN_STORAGE("T01","入库凭证","凭证类型"),
    DRAW("T02","翻牌凭证","凭证类型"),
    OUT_STORAGE("T03","出库凭证","凭证类型"),
    MOVE_STORAGE("T04","移库凭证","凭证类型"),
    HOLD_STORAGE("T05","库存冻结凭证","凭证类型"),
    UN_HOLD_STORAGE("T06","库存解冻凭证","凭证类型"),
    ADJUST_STORAGE("T07","库存调整凭证","凭证类型");



    /**
     * 枚举值
     */
    private String code;

    /**
     * 枚举名称
     */
    private String enumName;

    /**
     * 枚举实体类属性描述
     */
    private String description;

    TrsnNoteTypeEnum(String enumName, String description) {
        this.enumName = enumName;
        this.description = description;
    }

    TrsnNoteTypeEnum(String code, String enumName, String description) {
        this.code = code;
        this.enumName = enumName;
        this.description = description;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public static TrsnNoteTypeEnum getEnumByCode(String enumCode) {
        TrsnNoteTypeEnum[] values = TrsnNoteTypeEnum.values();
        TrsnNoteTypeEnum samplingEnum = null;

        for (TrsnNoteTypeEnum value : values) {
            if (value.getCode() == enumCode) {
                samplingEnum = value;
            }
        }
        return samplingEnum;
    }

    public static TrsnNoteTypeEnum getEnumByName(String enumName) {
        TrsnNoteTypeEnum[] values = TrsnNoteTypeEnum.values();
        TrsnNoteTypeEnum repairEnum = null;

        for (TrsnNoteTypeEnum value : values) {
            if (value.getEnumName() == enumName) {
                repairEnum = value;
            }
        }
        return repairEnum;
    }

    public String getEnumName() {
        return enumName;
    }

    public void setEnumName(String enumName) {
        this.enumName = enumName;
    }


}
